package top.ljjapp.wiremock;

import com.github.tomakehurst.wiremock.client.WireMock;

public class MockService {
    public static void main(String[] args) {
        //配置端口
        WireMock.configureFor(8080);
        //清空之前所有配置
        WireMock.removeAllMappings();

        WireMock.stubFor(WireMock.get(WireMock.urlPathEqualTo("/order/1"))
                .willReturn(WireMock.aResponse()
                        .withBody("{\"id\":1}")
                        .withStatus(200)
                )
        );
    }
}
